package yf.mall.dao;

import org.apache.ibatis.annotations.Param;
import yf.mall.entity.KolOrderStatEntity;
import yf.mall.entity.custom.KolOrderStatMap;
import yf.mall.vo.KolOrderStatVo;
import org.apache.ibatis.annotations.Mapper;
import com.yf.dao.BaseDao;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 * 统计信息表Dao
 *
 * 
 *
 * @date Sun Jul 30 10:43:48 CST 2023
 */
@Mapper
public interface KolOrderStatDao extends BaseDao<KolOrderStatEntity> {

    List<KolOrderStatVo> findVo(KolOrderStatVo vo);

    KolOrderStatVo getVo(Long id);

    /**
     *  获取统计数据
     * @param openIds openId
     * @param begin
     * @param end
     * @param orderBy 排序
     * @param limit 限制条数
     * @return
     */
    List<KolOrderStatEntity> findOrderStatByOpenIds(@Param("openIds") List<String> openIds, @Param("begin") Integer begin, @Param("end") Integer end, @Param("orderBy") String orderBy, @Param("limit") Integer limit);

    /**
     * 统计销售额最高的几个用户
     * @param begin
     * @param end
     * @param limit
     * @return
     */
    List<KolOrderStatMap> findTopPayAmountOrderStat(@Param("begin") Integer begin, @Param("end")Integer end, @Param("limit") Integer limit);
}
